package Day33;

public class EmployeeText {
    public static void main(String[] args) {
        Employee employer = new Employer("小周",2300);
        Employee manger = new Manger("语言",5000,400);
        System.out.println("员工的工资是" + employer.GetSalary(2300));
        System.out.println("经理的工资是" + manger.GetSalary(5000));
        sun(employer);
        sun(manger);
    }

    public static void sun(Employee e){
        if(e instanceof Employer){
            Employer er = (Employer)e;
            er.work();
        }else if(e instanceof Manger){
            Manger manger = (Manger)e;
            manger.wwork();
        }
    }
}
